﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace NLog
{
    // TODO: Implement proper logging for Metro

    public class LogManager
    {
        public static Logger GetCurrentClassLogger([CallerMemberName] string member = null)
        {
            return new Logger(member);
        }
    }

    public class Logger
    {
        private readonly string _className;

        public Logger(string className)
        {
            _className = className;
        }

        public void Error(string p)
        {
            System.Diagnostics.Debug.WriteLine("Error: " + _className + ":" + p);
        }

        public void Debug(string p)
        {
            System.Diagnostics.Debug.WriteLine("Debug: " + _className + ":" + p);
        }

        public void ErrorException(string message, Exception exception)
        {
            System.Diagnostics.Debug.WriteLine("Error: " + _className + ":" + message + "\nStackTrace:\n" + exception.StackTrace);
        }
    }
}
